package main

import (
	"gitee.com/DonHz/electronic-business-systems/mxshop_srvs/goods_srv/proto"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
)

var (
	brandClient proto.GoodsClient
	conn        *grpc.ClientConn
)

func Init() {
	var err error
	conn, err = grpc.NewClient("127.0.0.1:11805", grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		panic("create client connect failed: " + err.Error())
	}
	brandClient = proto.NewGoodsClient(conn)
}

func main() {
	Init()
	//TestBrandList()
	//TestCreateBrand()
	defer conn.Close()
	//TestDeleteBrand()
	//TestGetAllCategorysList()
	TestGetSubCategory()
}
